import { managedoor, manageedit, manageadd, manageset, manageDelete, list, edit, add, del, log, passDoor, operateDoor, remote, vistor, cmdList, confQr } from "@/api/equipment/door";
import store from "@/utils/store/cache"
// 门禁管理
export const actions = {
    //  所有门禁列表
    managedoor(context: any, params: any) {
        return managedoor(params)
    },
    //  编辑
    manageedit(context: any, params: any) {
        return manageedit(params)
    },
    //  新增
    manageadd(context: any, params: any) {
        return manageadd(params)
    },
    //  管理设置
    manageset(context: any, params: any) {
        return manageset(params)
    },
    //  管理删除
    manageDelete(context: any, params: any) {
        return manageDelete(params)
    },
    //  列表
    list(context: any, params: any) {
        return list(params)
    },
    //  编辑
    edit(context: any, params: any) {
        return edit(params)
    },
    //  新增
    add(context: any, params: any) {
        return add(params)
    },
    //  删除
    del(context: any, params: any) {
        return del(params)
    },
    //  日志
    log(context: any, params: any) {
        return log(params)
    },
    //  访客邀约记录
    vistor(context: any, params: any) {
        return vistor(params)
    },
    //  远程操作
    remote(context: any, params: any) {
        return remote(params)
    },
    confQr(context: any, params: any) {
        return confQr(params)
    },
    //  门禁厂商支持的指令
    cmdList(context: any, params: any) {
        return cmdList(params)
    },
    // 通行门禁
    passDoor(context: any, isReLoad = false) {
        store.loadCacheDataByFun(context, 'passDoor', passDoor, null, { isReLoad });
    },
    // 运营门禁
    operateDoor(context: any, isReLoad = false) {
        store.loadCacheDataByFun(context, 'operateDoor', operateDoor, null, { isReLoad });
    }
}
